<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">物流订单系统</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    		<!-- 用户登录的菜单 -->
    		<c:if test="${not empty sessionScope.login_user }">
	      <ul class="nav navbar-nav">
	        <li><a href="user/main">我的订单</a></li>
	        <li><a href="order/add">立即下单</a></li>
	      </ul>
	      
	      <ul class="nav navbar-nav navbar-right">
	         <li><a>欢迎用户： ${sessionScope.login_user.mobile }</a></li>
	         <li class="active"><a href="login.jsp" onclick="return confirm('确认要注销登录吗?');">注销</a></li>
	      </ul>
	    </c:if>
	    
	    <!-- 司机登录的菜单 -->
    		<c:if test="${not empty sessionScope.login_driver }">
	      <ul class="nav navbar-nav">
	      	<li><a href="driver/main">抢单列表</a></li>
	        <li><a href="order/driver/own">我的订单</a></li>
	      </ul>
	      
	      <ul class="nav navbar-nav navbar-right">
	         <li><a>欢迎司机： ${sessionScope.login_driver.mobile }</a></li>
	         <li class="active"><a href="driver_login.jsp" onclick="return confirm('确认要注销登录吗?');">注销</a></li>
	      </ul>
	    </c:if>
	    
	    <!-- 如果都没有登录，则显示 -->
	    <c:if test="${empty sessionScope.login_user && empty sessionScope.login_driver }">
      	<ul class="nav navbar-nav">
      		<li><a href="index.jsp">首页</a></li>
	        <li><a href="driver_reg.jsp">司机加入</a></li>
	        <li><a href="regist.jsp">我要运货</a></li>
	      </ul>
	      <ul class="nav navbar-nav navbar-right">
	         <li><a href="driver_login.jsp">司机入口</a></li>
	         <li><a href="login.jsp">用户入口</a></li>
	      </ul>
	      </c:if>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>



